<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/common_setting_unit.php");         // 引入通用的设置文件 ?>
<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/module/head.php"); // 引入通用的头部 ?>
<?php include_once("../controller/data_list.php");                     // 当前页面的控制器 ?>



<body>

<!--顶部栏-->
<div id="topbar"> <?php include $_SERVER['DOCUMENT_ROOT'] . '/controller/common/module/topbar.php'; ?></div>

<!--容器-->
<div id="container" class="<? echo $now_extender ?>">

<!--侧边栏-->
<div id="sidebar"><?php include $_SERVER['DOCUMENT_ROOT'] . '/controller/common/module/sidebar.php'; ?></div>




    <?
        //==============================================================================
        //这里开始才是平常开发需要注重的部分，其余的基本不用理会
        //==============================================================================
        ?>

  
        <div id="content" class="layui-form">

            <!--标题设定-->
            <?php $page_title='申请列表';?>
            <?php include $_SERVER['DOCUMENT_ROOT']. '/controller/common/module/mod-page-title.php'; ?>

            <!--搜索框-->
            <?php include 'module/mod-search.php'; ?>






            <!-- 用$now_extender .list_boxe来控制来到确认板块信息显示-->
            <div class="list-box">
     
                    <table class="layui-table layui-form">
                        <colgroup>
                            <col  >
                            <col  >
                            <col  >
                            <col  >
                            <col  >
                            <col  >
                            <col  >
                            <col width="250" >
                        </colgroup>
                        <thead>
                        <tr>

                            <th>申请编号</th>
                            <th>订单号</th>
                            <th>退款理由</th>
                            <th>退款金额</th>
<!--                            <th>用户申请时间</th>-->
<!--                            <th>退款时间</th>-->
                            <th>内部申请时间</th>
                            <th>申请人</th>
<!--                            <th>停止配送时间</th>-->
                            <th>审核状态</th>
                            <th>审核时间</th>
                            <th>操作</th>

                        </tr>
                        </thead>
                        <tbody>


                        <?php for ($i = 0; $i < $_quantity_per_page; $i++) {?>

                            <tr id="item<? echo $_list[$i]['nid'] ?>">


                                <td><div class="els2"><? echo $_list[$i]['nid'] ?></div></td>
                                <td><div class="els2"><? echo $_list[$i]['order_nid'] ?></div></td>
                                <td><div class="els2"><? echo $_list[$i]['remark'] ?></div></td>
                                <td><div class="els2"><? echo $_list[$i]['price'] ?></div></td>
<!--                                <td><div class="els2"></div></td>-->
<!--                                <td><div class="els2"></div></td>-->
                                <td><? echo $_list[$i]['apply_date'] ?></td>
                                <td><? echo $_list[$i]['apply_employee'] ?></td>
<!--                                <td>--><?// echo $_list[$i]['stop_deliver_date'] ?><!--</td>-->
                                <td><? echo $_list[$i]['apply_status'] ?>
                                <td><? echo $_list[$i]['aprove_date'] ?>
                                </td>

                                <td>
                                    <a onclick="window_eject('data_apply_edit_window.php?<? echo $data['url_parameter'] ?>&nid=<? echo $_list[$i]['nid'] ?>')"
                                       class="layui-btn  layui-btn-sm">
                                        <i class="fa fa-bar-chart-o" aria-hidden="true"></i>修改申请
                                    </a>


                                    <?if(
                                            (in_array("退款审核_审核申请",$quanxian)) or
                                            (in_array("admin",$quanxian))
                                    )
                                    {?>
                                    <a onclick="window_eject('data_info_window.php?<? echo $data['url_parameter'] ?>&nid=<? echo $_list[$i]['nid'] ?>')"
                                       class="layui-btn  layui-btn-sm">
                                        <i class="fa fa-bar-chart-o" aria-hidden="true"></i>审核
                                    </a>
                                    <?;}?>



                                </td>

                                
                            </tr>
                        <?php;} ?>

                        <?php //无数据时显示
                            if (count($_list) == 0) { echo "<tr class='no_data'><td colspan='15'>暂无数据</td></tr>"; }
                        ?>

                        </tbody>
                    </table>





                    <!-- todo 这里需要做0判断-->
                    <!-- 翻页代码-->
                    <?php include 'module/page_numbers.php'; ?>


            </div>
            <!--list-box end-->


        </div>
        <!--content端點01-->
        <?
        //==============================================================================
        //这里上面才是平常开发需要注重的部分，下面的基本不用理会，只有底部JS部分需要根据实际情况去加载
        //==============================================================================
        ?>





<br class="clearfloat"/>
<!--container-->
</div>




<!--底部栏-->
<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>


<!--载入删除功能-->
<script type="text/javascript" src="/controller/common/asset/js/deleter.js"></script>

<!--载入弹出窗口功能-->
<script type="text/javascript" src="/controller/common/asset/js/window_eject.js"></script>


<!--载入弹checkbox全选功能；在layui内部实现-->
<script type="text/javascript" src="/controller/common/asset/js/check_all_checkbox.js"></script>
<script type="text/javascript" src="/controller/common/asset/js/mulity_delete_button.js"></script>



<script>
    //layui渲染过的元素，需要在这里写函数

    layui.use('form', function(){
        var form = layui.form;

        //layui中，处理checkbox
        check_all_checkbox(form)

        //监控复选框，选择一个就触发删除按钮
        mulity_delete_button(form)


    });
</script>




</body>
</html>
